Apache 2.2: mod_proxy_balancer does not work as documented?
Apache 2.2: mod_proxy_balancer does not work as documented?
am 14.01.2010 09:28:37 von Francis Galiegue
Hello everyone,
For a production platform, we have plans to migrate to Apache 2.2,
using mod_proxy_ajp and mod_proxy_balancer instead of mod_jk.
Unfortunately, while the "single Tomcat below" case works with no
problem, the balancer does not work at all...
Here is the relevant part of the configuration:
BalancerMember
ajp://tomcat-rod-r7.admin.one2team.rod:8009 keepalive=3DOn
BalancerMember
ajp://tomcat-cdgdev-r7.admin.one2team.rod:8009 keepalive=3DOn
ProxySet stickysession=3DJSESSIONID nofailover=3DOn
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/servlet/ [OR]
RewriteCond %{REQUEST_URI} \.jsp$
RewriteRule ^/(.*) balancer://rod-r7/$1 [P]
With this configuration, sessions do not stick :(
So, looking at the documentation again, I saw that there is a
scolonpathdelim parameter which can be set to On, in order to account
for the part behind the ';' in the JSESSIONID. And indeed, there is
one in the generated cookies.
Unfortunately, when I add this to the ProxySet directive above, httpd
-S says that the parameter is unknown :(
Help :(
--=20
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 2.2: mod_proxy_balancer does not work as
am 14.01.2010 09:33:20 von Philip Wigg
2010/1/14 Francis GALIEGUE :
> Hello everyone,
>
> For a production platform, we have plans to migrate to Apache 2.2,
> using mod_proxy_ajp and mod_proxy_balancer instead of mod_jk.
>
> Unfortunately, while the "single Tomcat below" case works with no
> problem, the balancer does not work at all...
>
> Here is the relevant part of the configuration:
>
> =A0 =A0 =A0 =A0
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BalancerMember
> ajp://tomcat-rod-r7.admin.one2team.rod:8009 keepalive=3DOn
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BalancerMember
> ajp://tomcat-cdgdev-r7.admin.one2team.rod:8009 keepalive=3DOn
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ProxySet stickysession=3DJSESSIONID nofail=
over=3DOn
> =A0 =A0 =A0 =A0
>
> =A0 =A0 =A0 =A0RewriteEngine On
> =A0 =A0 =A0 =A0RewriteCond %{REQUEST_URI} ^/servlet/ [OR]
> =A0 =A0 =A0 =A0RewriteCond %{REQUEST_URI} \.jsp$
> =A0 =A0 =A0 =A0RewriteRule ^/(.*) balancer://rod-r7/$1 [P]
>
> With this configuration, sessions do not stick :(
>
> So, looking at the documentation again, I saw that there is a
> scolonpathdelim parameter which can be set to On, in order to account
> for the part behind the ';' in the JSESSIONID. And indeed, there is
> one in the generated cookies.
>
> Unfortunately, when I add this to the ProxySet directive above, httpd
> -S says that the parameter is unknown :(
ProxySet is only available in Apache 2.2 and later. Are you sure
you're running the 'httpd -S' from the right version of Apache?
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 2.2: mod_proxy_balancer does not work as
am 14.01.2010 09:34:00 von Devraj Mukherjee
Hi Francis,
I use mod_proxy_ajp to proxy Pentaho, also a Tomcat application. I
think what you are looking for is ProxyPassReverseCookieDomain so the
cookies are set for the right domain.
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypas sreversecookied=
omain
Let me know if you want me to share my configuration files.
On Thu, Jan 14, 2010 at 7:28 PM, Francis GALIEGUE wrote:
> Hello everyone,
>
> For a production platform, we have plans to migrate to Apache 2.2,
> using mod_proxy_ajp and mod_proxy_balancer instead of mod_jk.
>
> Unfortunately, while the "single Tomcat below" case works with no
> problem, the balancer does not work at all...
>
> Here is the relevant part of the configuration:
>
> =A0 =A0 =A0 =A0
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BalancerMember
> ajp://tomcat-rod-r7.admin.one2team.rod:8009 keepalive=3DOn
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BalancerMember
> ajp://tomcat-cdgdev-r7.admin.one2team.rod:8009 keepalive=3DOn
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ProxySet stickysession=3DJSESSIONID nofail=
over=3DOn
> =A0 =A0 =A0 =A0
>
> =A0 =A0 =A0 =A0RewriteEngine On
> =A0 =A0 =A0 =A0RewriteCond %{REQUEST_URI} ^/servlet/ [OR]
> =A0 =A0 =A0 =A0RewriteCond %{REQUEST_URI} \.jsp$
> =A0 =A0 =A0 =A0RewriteRule ^/(.*) balancer://rod-r7/$1 [P]
>
> With this configuration, sessions do not stick :(
>
> So, looking at the documentation again, I saw that there is a
> scolonpathdelim parameter which can be set to On, in order to account
> for the part behind the ';' in the JSESSIONID. And indeed, there is
> one in the generated cookies.
>
> Unfortunately, when I add this to the ProxySet directive above, httpd
> -S says that the parameter is unknown :(
>
> Help :(
>
> --
>
> Francis Galiegue
> ONE2TEAM
> Ing=E9nieur syst=E8me
> Mob : +33 (0) 683 877 875
> Tel : +33 (0) 178 945 552
> fge@one2team.com
> 40 avenue Raymond Poincar=E9
> 75116 Paris
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> =A0 " =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--=20
Follow me on Twitter, http://twitter.com/mdevraj
"The secret impresses no-one, the trick you use it for is everything"
- Alfred Borden (The Prestiege)
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 2.2: mod_proxy_balancer does not work as
am 14.01.2010 09:42:29 von Francis Galiegue
On Thu, Jan 14, 2010 at 09:34, Devraj Mukherjee wrote:
> Hi Francis,
>
> I use mod_proxy_ajp to proxy Pentaho, also a Tomcat application. I
> think what you are looking for is ProxyPassReverseCookieDomain so the
> cookies are set for the right domain.
>
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypas sreversecooki=
edomain
>
> Let me know if you want me to share my configuration files.
>
Yes please! In the meanwhile, I have found a way, which is to add a
route=3D parameter to each BalancerMember. I do set this parameter as
jvmRoute in the AJP connectors on the tomcat side, I didn't think it
would have an influence here. But it seems to have...
--=20
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 2.2: mod_proxy_balancer does not work as
am 14.01.2010 09:42:51 von Francis Galiegue
On Thu, Jan 14, 2010 at 09:33, Philip Wigg wrote:
>
> ProxySet is only available in Apache 2.2 and later. Are you sure
> you're running the 'httpd -S' from the right version of Apache?
>
Yes, this is Apache 2.2. 2.2.3 to be precise (the one bundled with rhel5).
--=20
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 2.2: mod_proxy_balancer does not work as
am 14.01.2010 09:47:09 von Francis Galiegue
On Thu, Jan 14, 2010 at 09:42, Francis GALIEGUE wrote:
> On Thu, Jan 14, 2010 at 09:34, Devraj Mukherjee wrote:
>> Hi Francis,
>>
>> I use mod_proxy_ajp to proxy Pentaho, also a Tomcat application. I
>> think what you are looking for is ProxyPassReverseCookieDomain so the
>> cookies are set for the right domain.
>>
>> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypas sreversecook=
iedomain
>>
>> Let me know if you want me to share my configuration files.
>>
>
> Yes please! In the meanwhile, I have found a way, which is to add a
> route=3D parameter to each BalancerMember. I do set this parameter as
> jvmRoute in the AJP connectors on the tomcat side, I didn't think it
> would have an influence here. But it seems to have...
>
Well no, it doesn't work, in fact :-(
--=20
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
RE: Apache 2.2: mod_proxy_balancer does not work asdocumented?
am 15.01.2010 04:40:21 von inas inassen
--_aa7bcbbd-511f-40a4-8268-1b606ed93fdc_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
English message follows
Salut Francis
Le mod_proxy fonctionne tres bien=2C je l'utilise en production depuis 2005=
et mon apache est configur=E9 pour service une quinzaine de tomcats repart=
is sur 6 virtuels host. Le JvmRoute est tres important=2C =E7a ne marche pa=
s sans ce parametre. Je suis maintenant =E0 la maison=2C quand j'arriverai =
demain au bureau je t'enverrai ma config.
Hi Francis=2C
The
mod_proxy works well=2C I'm using it in production since 2005 and my
apache is configured to service a around 15 Tomcats using 6 virtual hosts. =
The JvmRoute is very important=2C it does not work without this parameter.=
=20
Now=2C I am at home=2C when I'll get to the office tomorrow I'll send to yo=
u my config.
Inas
> Date: Thu=2C 14 Jan 2010 09:28:37 +0100
> From: fge@one2team.com
> To: users@httpd.apache.org
> Subject: [users@httpd] Apache 2.2: mod_proxy_balancer does not work as do=
cumented?
>=20
> Hello everyone=2C
>=20
> For a production platform=2C we have plans to migrate to Apache 2.2=2C
> using mod_proxy_ajp and mod_proxy_balancer instead of mod_jk.
>=20
> Unfortunately=2C while the "single Tomcat below" case works with no
> problem=2C the balancer does not work at all...
>=20
> Here is the relevant part of the configuration:
>=20
>
> BalancerMember
> ajp://tomcat-rod-r7.admin.one2team.rod:8009 keepalive=3DOn
> BalancerMember
> ajp://tomcat-cdgdev-r7.admin.one2team.rod:8009 keepalive=3DOn
> ProxySet stickysession=3DJSESSIONID nofailover=3DOn
>
>=20
> RewriteEngine On
> RewriteCond %{REQUEST_URI} ^/servlet/ [OR]
> RewriteCond %{REQUEST_URI} \.jsp$
> RewriteRule ^/(.*) balancer://rod-r7/$1 [P]
>=20
> With this configuration=2C sessions do not stick :(
>=20
> So=2C looking at the documentation again=2C I saw that there is a
> scolonpathdelim parameter which can be set to On=2C in order to account
> for the part behind the '=3B' in the JSESSIONID. And indeed=2C there is
> one in the generated cookies.
>=20
> Unfortunately=2C when I add this to the ProxySet directive above=2C httpd
> -S says that the parameter is unknown :(
>=20
> Help :(
>=20
> --=20
>=20
> Francis Galiegue
> ONE2TEAM
> Ing=E9nieur syst=E8me
> Mob : +33 (0) 683 877 875
> Tel : +33 (0) 178 945 552
> fge@one2team.com
> 40 avenue Raymond Poincar=E9
> 75116 Paris
>=20
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe=2C e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands=2C e-mail: users-help@httpd.apache.org
>=20
=20
____________________________________________________________ _____
Tchattez en direct en en vid=E9o avec vos amis ! =20
http://www.windowslive.fr/messenger/=
--_aa7bcbbd-511f-40a4-8268-1b606ed93fdc_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
English message follows
Salut Francis
Le mod_proxy foncti=
onne tres bien=2C je l'utilise en production depuis 2005 et mon apache est =
configur=E9 pour service une quinzaine de tomcats repartis sur 6 virtuels h=
ost. Le JvmRoute est tres important=2C =E7a ne marche pas sans ce parametre=
.. Je suis maintenant =E0 la maison=2C quand j'arriverai demain au bureau je=
t'enverrai ma config.
Hi Francis=2C
class=3D"long_text">
=3B" title=3D"Le mod_proxy fonctionne tres bien=2C je l'utilise en producti=
on depuis 2005 et mon apache est configur=E9 pour service une quinzaine de =
tomcats repartis sur 6 virtuels host.">The
mod_proxy works well=2C I'm using it in production since 2005 and my
apache is configured to service a around 15 Tomcats using 6 virtual hosts. =
"Le JvmRoute est tres important=2C =E7a ne marche pas sans ce parametre.">T=
he JvmRoute is very important=2C it does not work without this parameter. <=
br>Now=2C
" title=3D"Je suis maintenant =E0 la maison=2C quand j'arriverai demain au =
bureau je t'enverrai ma config.">I am at home=2C when I'll get to the offic=
e tomorrow I'll send to you my config.
Inas
>=
=3B Date: Thu=2C 14 Jan 2010 09:28:37 +0100
>=3B From: fge@one2team.co=
m
>=3B To: users@httpd.apache.org
>=3B Subject: [users@httpd] Apa=
che 2.2: mod_proxy_balancer does not work as documented?
>=3B
>=
=3B Hello everyone=2C
>=3B
>=3B For a production platform=2C we =
have plans to migrate to Apache 2.2=2C
>=3B using mod_proxy_ajp and mo=
d_proxy_balancer instead of mod_jk.
>=3B
>=3B Unfortunately=2C w=
hile the "single Tomcat below" case works with no
>=3B problem=2C the =
balancer does not work at all...
>=3B
>=3B Here is the relevant =
part of the configuration:
>=3B
>=3B <=3BProxy balance=
r://rod-r7>=3B
>=3B BalancerMember
>=3B ajp://t=
omcat-rod-r7.admin.one2team.rod:8009 keepalive=3DOn
>=3B =
BalancerMember
>=3B ajp://tomcat-cdgdev-r7.admin.one2team.rod:8009 =
keepalive=3DOn
>=3B ProxySet stickysession=3DJSESSIONI=
D nofailover=3DOn
>=3B <=3B/Proxy>=3B
>=3B
>=3B=
RewriteEngine On
>=3B RewriteCond %{REQUEST_URI} ^/se=
rvlet/ [OR]
>=3B RewriteCond %{REQUEST_URI} \.jsp$
>=3B =
RewriteRule ^/(.*) balancer://rod-r7/$1 [P]
>=3B
>=3B Wit=
h this configuration=2C sessions do not stick :(
>=3B
>=3B So=2C=
looking at the documentation again=2C I saw that there is a
>=3B scol=
onpathdelim parameter which can be set to On=2C in order to account
>=
=3B for the part behind the '=3B' in the JSESSIONID. And indeed=2C there is=
>=3B one in the generated cookies.
>=3B
>=3B Unfortunately=
=2C when I add this to the ProxySet directive above=2C httpd
>=3B -S s=
ays that the parameter is unknown :(
>=3B
>=3B Help :(
>=3B=
>=3B --
>=3B
>=3B Francis Galiegue
>=3B ONE2TEAM
>>=3B Ing=E9nieur syst=E8me
>=3B Mob : +33 (0) 683 877 875
>=3B=
Tel : +33 (0) 178 945 552
>=3B fge@one2team.com
>=3B 40 avenue R=
aymond Poincar=E9
>=3B 75116 Paris
>=3B
>=3B --------------=
-------------------------------------------------------
>=3B The offic=
ial User-To-User support forum of the Apache HTTP Server Project.
>=3B=
See <=3BURL:http://httpd.apache.org/userslist.html>=3B for more info.<=
br>>=3B To unsubscribe=2C e-mail: users-unsubscribe@httpd.apache.org
&=
gt=3B " from the digest: users-digest-unsubscribe@httpd.apache.org
=
>=3B For additional commands=2C e-mail: users-help@httpd.apache.org
&g=
t=3B
Windows 7 : Trouvez le PC qui vous convien=
t!
new'>D=E9couvrez notre offre !
=
--_aa7bcbbd-511f-40a4-8268-1b606ed93fdc_--
RE: Apache 2.2: mod_proxy_balancer does not work asdocumented?
am 15.01.2010 21:39:32 von inas inassen
--_dcf08c3c-4f57-4ff7-bd1c-565611b0a8fd_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi=20
=20
these are my config files
=20
in httpd.conf add
=20
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
=20
and include the proxy config files
=20
Include conf/extra/httpd-balancer.conf
and here is the httpd-balancer.conf
=20
=20
ProxyRequests off=20
# ==================== =====
==================== =====3D=
==================== =====3D=
==================== =3D #
# #
# Balancer Manager in Apache #
# http://testweb.tres.bnc.ca/balancer-manager #
# #
# ==================== =====
==================== =====3D=
==================== =====3D=
==================== =3D #
SetHandler balancer-manager
AuthType Digest
AuthName "/server-info"
AuthDigestDomain /server-info https://testweb.tres.bnc.ca/server-info
AuthDigestProvider file
AuthUserFile /usr/local/apache2.2.4/conf/.digest_pw
Require valid-user
Order Deny=2CAllow
Allow from all
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=3DOn
=20
#balancers
BalancerMember ajp://server1:8881 route=3Dserver1 loadfactor=3D1 keep=
alive=3DOn
BalancerMember ajp://server2:8882 route=3Dserver2 loadfactor=3D1 keep=
alive=3DOn
=20
#balanced application
=20
ProxyPass balancer://tomcats/app1/ nofailover=3DOn lbmethod=3Dbyrequest=
s
ProxyPassReverse balancer://tomcats/app1/
Order Deny=2CAllow=20
Allow from all=20
=20
=20
ProxyPass balancer://tomcats/app2/ nofailover=3DOn lbmethod=3Dbyrequest=
s
ProxyPassReverse balancer://tomcats/app2/
Order Deny=2CAllow=20
Allow from all=20
=20
=20
=20
also add the jvmroot in your tomcat server.xml in the first tomcat
=20
=20
..........
=20
=20
and in the second tomcat
=20
=20
..........
=20
=20
=20
that's it
=20
From: mezghena@hotmail.com
To: users@httpd.apache.org=3B fge@one2team.com
Date: Fri=2C 15 Jan 2010 03:40:21 +0000
Subject: RE: [users@httpd] Apache 2.2: mod_proxy_balancer does not work as =
documented?
English message follows
Salut Francis
Le mod_proxy fonctionne tres bien=2C je l'utilise en production depuis 2005=
et mon apache est configur=E9 pour service une quinzaine de tomcats repart=
is sur 6 virtuels host. Le JvmRoute est tres important=2C =E7a ne marche pa=
s sans ce parametre. Je suis maintenant =E0 la maison=2C quand j'arriverai =
demain au bureau je t'enverrai ma config.
Hi Francis=2C
The mod_proxy works well=2C I'm using it in production since 2005 and my ap=
ache is configured to service a around 15 Tomcats using 6 virtual hosts. Th=
e JvmRoute is very important=2C it does not work without this parameter.=20
Now=2C I am at home=2C when I'll get to the office tomorrow I'll send to yo=
u my config.
Inas
> Date: Thu=2C 14 Jan 2010 09:28:37 +0100
> From: fge@one2team.com
> To: users@httpd.apache.org
> Subject: [users@httpd] Apache 2.2: mod_proxy_balancer does not work as do=
cumented?
>=20
> Hello everyone=2C
>=20
> For a production platform=2C we have plans to migrate to Apache 2.2=2C
> using mod_proxy_ajp and mod_proxy_balancer instead of mod_jk.
>=20
> Unfortunately=2C while the "single Tomcat below" case works with no
> problem=2C the balancer does not work at all...
>=20
> Here is the relevant part of the configuration:
>=20
>
> BalancerMember
> ajp://tomcat-rod-r7.admin.one2team.rod:8009 keepalive=3DOn
> BalancerMember
> ajp://tomcat-cdgdev-r7.admin.one2team.rod:8009 keepalive=3DOn
> ProxySet stickysession=3DJSESSIONID nofailover=3DOn
>
>=20
> RewriteEngine On
> RewriteCond %{REQUEST_URI} ^/servlet/ [OR]
> RewriteCond %{REQUEST_URI} \.jsp$
> RewriteRule ^/(.*) balancer://rod-r7/$1 [P]
>=20
> With this configuration=2C sessions do not stick :(
>=20
> So=2C looking at the documentation again=2C I saw that there is a
> scolonpathdelim parameter which can be set to On=2C in order to account
> for the part behind the '=3B' in the JSESSIONID. And indeed=2C there is
> one in the generated cookies.
>=20
> Unfortunately=2C when I add this to the ProxySet directive above=2C httpd
> -S says that the parameter is unknown :(
>=20
> Help :(
>=20
> --=20
>=20
> Francis Galiegue
> ONE2TEAM
> Ing=E9nieur syst=E8me
> Mob : +33 (0) 683 877 875
> Tel : +33 (0) 178 945 552
> fge@one2team.com
> 40 avenue Raymond Poincar=E9
> 75116 Paris
>=20
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project=
..
> See for more info.
> To unsubscribe=2C e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands=2C e-mail: users-help@httpd.apache.org
>=20
Windows 7 : Trouvez le PC qui vous convient! D=E9couvrez notre offre ! =
=20
____________________________________________________________ _____
Discutez en direct avec vos amis sur Messenger !
http://www.windowslive.fr/messenger=
--_dcf08c3c-4f57-4ff7-bd1c-565611b0a8fd_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi
 =3B
these are my config files
 =3B
in =3Bhttpd.conf add
 =3B
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
 =3B
and include =3Bthe proxy =3Bconfig files
 =3B
<=3BIfModule proxy_module>=3B
<=3BIfModule proxy_ajp_module>=3B
<=3BIfModule proxy_balancer_module>=3B
 =3B =3B =3B =3B =3B =3B Include conf/extra/httpd-b=
alancer.conf
<=3B/IfModule>=3B
<=3B/IfModule>=3B
<=3B/IfModule>=3B
and here is the httpd-balancer.conf
 =3B
 =3B
ProxyRequests off
# ==================== =====
==================== =====3D=
==================== =====3D=
==================== =3D #
# #
# Balancer Manager in Apache #
# http://testweb.tres.bnc.ca/balancer-manager #
# #
# ==================== =====
==================== =====3D=
==================== =====3D=
==================== =3D #
<=3BLocation /balancer-manager>=3B
SetHandler balancer-manager
AuthType Digest
AuthName "/server-info"
AuthDigestDomain /server-info https://testweb.tres.bnc.ca/server-info
AuthDigestProvider file
AuthUserFile /usr/local/apache2.2.4/conf/.digest_pw
Require valid-user
Order Deny=2CAllow
Allow from all
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=3DOn
<=3B/Location>=3B
 =3B
#balancers
<=3BProxy balancer://tomcats/>=3B
 =3B =3B =3B =3B =3B BalancerMember ajp://server1:8881 =
route=3Dserver1 loadfactor=3D1 keepalive=3DOn
 =3B =3B =3B =3B =3B BalancerMember ajp://server2:8882 =
route=3Dserver2 loadfactor=3D1 keepalive=3DOn
<=3B/Proxy>=3B
 =3B
#balanced application
<=3BLocation /app1/>=3B
 =3B =3B =3B ProxyPass balancer://tomcats/app1/ =3Bnofailov=
er=3DOn lbmethod=3Dbyrequests
 =3B =3B =3B ProxyPassReverse balancer://tomcats/app1/
 =3B =3B =3B Order Deny=2CAllow
 =3B =3B =3B Allow from all
<=3B/Location>=3B
<=3BLocation /app2/>=3B
 =3B =3B =3B ProxyPass balancer://tomcats/app2/ =3Bnofailov=
er=3DOn lbmethod=3Dbyrequests
 =3B =3B =3B ProxyPassReverse balancer://tomcats/app2/
 =3B =3B =3B Order Deny=2CAllow
 =3B =3B =3B Allow from all
<=3B/Location>=3B
 =3B
 =3B
also add the jvmroot in your tomcat server.xml in the first tomcat
 =3B
<=3BEngine name=3D"Catalina" defaultHost=3D"server=
1" jvmRoute=3D"server1">=3B
 =3B
..........
 =3B
<=3B/Engine>=3B
 =3B
and in the second tomcat
 =3B
<=3BEngine name=3D"Catalina" defaultHost=3D"server=
2" jvmRoute=3D"server2">=3B
 =3B
..........
 =3B
<=3B/Engine>=3B
 =3B
 =3B
that's it
 =3B
From: mezghena@hotmail.com
To: users@httpd.apache.org=3B fge@one2team.co=
m
Date: Fri=2C 15 Jan 2010 03:40:21 +0000
Subject: RE: [users@httpd] =
Apache 2.2: mod_proxy_balancer does not work as documented?
English message follows
Salut Francis
Le mod_proxy foncti=
onne tres bien=2C je l'utilise en production depuis 2005 et mon apache est =
configur=E9 pour service une quinzaine de tomcats repartis sur 6 virtuels h=
ost. Le JvmRoute est tres important=2C =E7a ne marche pas sans ce parametre=
.. Je suis maintenant =E0 la maison=2C quand j'arriverai demain au bureau je=
t'enverrai ma config.
Hi Francis=2C
xt id=3Decxresult_box>
e l'utilise en production depuis 2005 et mon apache est configur=E9 pour se=
rvice une quinzaine de tomcats repartis sur 6 virtuels host." style=3D"BACK=
GROUND-COLOR: rgb(255=2C255=2C255)">The mod_proxy works well=2C I'm using i=
t in production since 2005 and my apache is configured to service a around =
15 Tomcats using 6 virtual hosts.
s important=2C =E7a ne marche pas sans ce parametre." style=3D"BACKGROUND-C=
OLOR: rgb(255=2C255=2C255)">The JvmRoute is very important=2C it does not w=
ork without this parameter.
Now=2C
nant =E0 la maison=2C quand j'arriverai demain au bureau je t'enverrai ma c=
onfig." style=3D"BACKGROUND-COLOR: rgb(255=2C255=2C255)">I am at home=2C wh=
en I'll get to the office tomorrow I'll send to you my config.
Inas<=
BR>
>=3B Date: Thu=2C 14 Jan 2010 09:28:37 +0100
>=
=3B From: fge@one2team.com
>=3B To: users@httpd.apache.org
>=3B S=
ubject: [users@httpd] Apache 2.2: mod_proxy_balancer does not work as docum=
ented?
>=3B
>=3B Hello everyone=2C
>=3B
>=3B For a pr=
oduction platform=2C we have plans to migrate to Apache 2.2=2C
>=3B us=
ing mod_proxy_ajp and mod_proxy_balancer instead of mod_jk.
>=3B
&=
gt=3B Unfortunately=2C while the "single Tomcat below" case works with no
R>>=3B problem=2C the balancer does not work at all...
>=3B
>=
=3B Here is the relevant part of the configuration:
>=3B
>=3B &l=
t=3BProxy balancer://rod-r7>=3B
>=3B BalancerMember
>=3B ajp://=
tomcat-rod-r7.admin.one2team.rod:8009 keepalive=3DOn
>=3B BalancerMemb=
er
>=3B ajp://tomcat-cdgdev-r7.admin.one2team.rod:8009 keepalive=3DOn<=
BR>>=3B ProxySet stickysession=3DJSESSIONID nofailover=3DOn
>=3B <=
=3B/Proxy>=3B
>=3B
>=3B RewriteEngine On
>=3B RewriteCond=
%{REQUEST_URI} ^/servlet/ [OR]
>=3B RewriteCond %{REQUEST_URI} \.jsp$=
>=3B RewriteRule ^/(.*) balancer://rod-r7/$1 [P]
>=3B
>=3B=
With this configuration=2C sessions do not stick :(
>=3B
>=3B S=
o=2C looking at the documentation again=2C I saw that there is a
>=3B =
scolonpathdelim parameter which can be set to On=2C in order to account
=
>=3B for the part behind the '=3B' in the JSESSIONID. And indeed=2C there=
is
>=3B one in the generated cookies.
>=3B
>=3B Unfortunat=
ely=2C when I add this to the ProxySet directive above=2C httpd
>=3B -=
S says that the parameter is unknown :(
>=3B
>=3B Help :(
>=
=3B
>=3B --
>=3B
>=3B Francis Galiegue
>=3B ONE2TEAM=
>=3B Ing=E9nieur syst=E8me
>=3B Mob : +33 (0) 683 877 875
>=
=3B Tel : +33 (0) 178 945 552
>=3B fge@one2team.com
>=3B 40 avenu=
e Raymond Poincar=E9
>=3B 75116 Paris
>=3B
>=3B -----------=
----------------------------------------------------------
>=3B The of=
ficial User-To-User support forum of the Apache HTTP Server Project.
>=
=3B See <=3BURL:http://httpd.apache.org/userslist.html>=3B for more inf=
o.
>=3B To unsubscribe=2C e-mail: users-unsubscribe@httpd.apache.org
R>>=3B " from the digest: users-digest-unsubscribe@httpd.apache.org
&g=
t=3B For additional commands=2C e-mail: users-help@httpd.apache.org
>=
=3B
Windows 7 : Trouvez le PC qui vous convient!
m/FRM/go/181574577/direct/01/">D=E9couvrez notre offre !
r />
Discute avec tes amis partout=2C gr=E2ce =E0 Messenger sur ton mo=
bile. C=
liquez ici !
=
--_dcf08c3c-4f57-4ff7-bd1c-565611b0a8fd_--
Re: Apache 2.2: mod_proxy_balancer does not work as
am 20.01.2010 17:25:33 von Francis Galiegue
On Fri, Jan 15, 2010 at 21:39, inas inassen wrote:
> Hi
>
> these are my config files
>
> in httpd.conf add
>
[...]
Thank you!
Following these instructions, reading here and there and putting it
all together, I managed to get it to work.
--=20
Francis Galiegue
ONE2TEAM
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
fge@one2team.com
40 avenue Raymond Poincaré
75116 Paris
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org